from selenium.webdriver.common.by import By

from Web_PO.PO_ceshiren.ceshiren.BaseDriver import BaseDriver
from Web_PO.PO_ceshiren.ceshiren.seach_package import SeachPackage
from utils.log_util import logger


class Main_Package(BaseDriver):

    def main_package(self):
        logger.info('点击搜索按钮')
        self.find_and_click(By.ID,'search-button')

        # self.driver.find_element(By.ID, 'search-button').click()
        logger.info('点击高级搜索')
        self.find_and_click(By.XPATH,"//*[@class = 'searching']")

        # self.driver.find_element(By.XPATH, "//*[@class = 'searching']").click()
        # 跳转到搜索页面
        return SeachPackage(self.driver)
